From: Eh2406 Date: Fri, 2 Mar 2018 02:05:22 +0000 (-0500) Subject: missed this important bug X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~2^2~68^2~2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=7a9b68c99b697501f498d1a7ce8c8df5ee6ddf87;p=cargo.git missed this important bug --- diff --git a/src/cargo/core/resolver/mod.rs b/src/cargo/core/resolver/mod.rs index 8db8159ca..34225a7aa 100644 --- a/src/cargo/core/resolver/mod.rs +++ b/src/cargo/core/resolver/mod.rs @@ -778,8 +778,6 @@ fn activate_deps_loop<'a>( &mut remaining_candidates, &mut conflicting_activations, ).ok_or_else(|| { - // if we hit an activation error and we are out of other combinations - // then just report that error activation_error( &cx, registry, @@ -827,8 +825,20 @@ fn activate_deps_loop<'a>( // Add an entry to the `backtrack_stack` so // we can try the next one if this one fails. - if has_another && successfully_activated { - backtrack_stack.push(backtrack); + if successfully_activated { + if has_another { + backtrack_stack.push(backtrack); + } + } else { + // `activate` changed `cx` and then failed so put things back. + cur = backtrack.cur; + cx = backtrack.context_backup; + remaining_deps = backtrack.deps_backup; + remaining_candidates = backtrack.remaining_candidates; + parent = backtrack.parent; + dep = backtrack.dep; + features = backtrack.features; + conflicting_activations = backtrack.conflicting_activations; } } }